<!DOCTYPE html>
<html lang="zh-CN" class="loading">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>求数列通项的特征根法 - Skyone-Blog</title>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="google" content="notranslate" />
    <meta name="keywords" content="高中数学,数学,数列,特征方程,特征根,"> 
    <meta name="description" content="Skyone技术博客,这篇文章记录了求数列通项的特征根法，由一个行列式求值问题引出。对于二阶线性递推求通项问题，这种方法非常实用。"> 
    <meta name="author" content="王志伟"> 
    <link rel="alternative" href="atom.xml" title="Skyone-Blog" type="application/atom+xml"> 
    <link rel="icon" href="/img/favicon.png"> 
    
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">

    
<link rel="stylesheet" href="/css/diaspora.css">

    <!-- 看板娘
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
    <script src="/live2d-widget/autoload.js"></script>
    -->
    <!-- MD5 -->
    <script src="/js/md5.min.js"></script>
    <!-- MathJax -->
    
        <script type="text/x-mathjax-config">
        (function () {
            let target = document.getElementsByClassName("content")[0];
            MathJax.Hub.Config({
                tex2jax: {
                    inlineMath:  [ ["$", "$"] ],
                    displayMath: [ ["$$","$$"] ],
                    skipTags: ['script', 'noscript', 'style', 'textarea', 'pre','code','a'],
                    ignoreClass:"class1"
                }
            });
            MathJax.Hub.Queue(["Typeset",MathJax.Hub,target]);
        })();
    </script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

    
<meta name="generator" content="Hexo 5.3.0"></head>

<body class="loading">
    <span id="config-title" style="display:none">Skyone-Blog</span>
    <div id="loader"></div>
    <div id="single">
    <div id="top" style="display: block;">
    <div class="bar" style="width: 0;"></div>
    <a class="iconfont icon-home image-icon" href="javascript:;" data-url="https://www.skyone.host"></a>
    <div title="播放/暂停" class="iconfont icon-play"></div>
    <h3 class="subtitle">求数列通项的特征根法</h3>
    <div class="social">
        <div>
            <div class="share">
                <a title="获取二维码" class="iconfont icon-scan" href="javascript:;"></a>
            </div>
            <div id="qr"></div>
        </div>
    </div>
    <div class="scrollbar"></div>
</div>

    <div class="section">
        <div class="article">
    <div class='main'>
        <h1 class="title">求数列通项的特征根法</h1>
        <div class="stuff">
            <span>三月 14, 2021</span>
            
  <ul class="post-tags-list" itemprop="keywords"><li class="post-tags-list-item"><a class="post-tags-list-link" href="/tags/%E6%95%B0%E5%AD%A6/" rel="tag">数学</a></li></ul>


        </div>
        <div class="content markdown">
            <blockquote>
<p><em>黑色的方块鼠标或手指移到那里就会显示了哦。</em></p>
</blockquote>
<p>在上一篇文章中提到过数列二阶线性递推的特征根法，这篇文章来详细介绍一下。</p>
<p>其实，高中就有这个内容，别不承认，在选修4-1中。我一个高中同学就经常和我提，但我一窍不通。<del>可能我上的假高中。</del>好了，进入正题。</p>
<h2 id="二阶线性递推求通项"><a href="#二阶线性递推求通项" class="headerlink" title="二阶线性递推求通项"></a>二阶线性递推求通项</h2><h3 id="推导"><a href="#推导" class="headerlink" title="推导"></a>推导</h3><p>已知数列的前两项<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=x_1,x_2" alt="数学公式">和递推公式<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=x_{n%2B1}=px_n%2Bqx_{n-1}" alt="数学公式">，求数列<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=\{x_n\}" alt="数学公式">的通项。</p>
<p>怎么开始呢，我们可以使用待定系数法构造公比为<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=b" alt="数学公式">的等比数列<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=\{x_{n%2B1}-ax_n\}" alt="数学公式"></p>
<p>设：</p>
<img src="https://www.zhihu.com/equation?tex=x_{n%2B1}-ax_n=b(x_n-ax_{n-1})" alt="数学公式">

<p>移项，合并同类项：</p>
<img src="https://www.zhihu.com/equation?tex=x_{n%2B1}=(a%2Bb)x_n-abx_{n-1}" alt="数学公式">

<p>根据递推公式可得：</p>
<img src="https://www.zhihu.com/equation?tex=%5Cleft%5C%7B+%5Cbegin%7Baligned%7D+%26a%2Bb%3Dp%5C%5C+%26ab%3D-q+%5Cend%7Baligned%7D+%5Cright." alt="数学公式">

<p>好，下面重点来了，<strong>根据韦达定理反推解为a,b的方程</strong>：</p>
<img src="https://www.zhihu.com/equation?tex=x^2-px-q=0" alt="数学公式">

<p>嗯，这就是<strong>特征方程</strong>，是不是有点像解二阶线性常系数齐次微分方程用到的特征方程？</p>
<p>那么，这个方程接出来之后有什么用呢？</p>
<p>我们根据<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=a" alt="数学公式">和<img style="display:inline-block;height:25px;" src="https://www.zhihu.com/equation?tex=b" alt="数学公式">的关系列出了方程，两个根因该就是<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=a,b" alt="数学公式">的值，也就是说，我们可以认为<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=a,b" alt="数学公式">是<strong>已知的常量</strong>。</p>
<p>好现在回到那个我们构造的等比数列，根据等比数列常用的求通项方法：<strong>累乘法</strong>，可得：</p>
<img src="https://www.zhihu.com/equation?tex=x_{n%2B1}-ax_n=b^{n-1}(x_2-ax_1)_{(1)}" alt="数学公式">

<p>但是，请注意，这里的<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=a" alt="数学公式">和<img style="display:inline-block;height:25px;" src="https://www.zhihu.com/equation?tex=b" alt="数学公式">分别对应特征方程的两个解，可是哪个对应哪个呢？</p>
<p>答案是两种都有可能，<del>咳咳，不信你们直接解关于ab的方程，肯定有两组解</del></p>
<p>总之，<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=a" alt="数学公式">和<img style="display:inline-block;height:25px;" src="https://www.zhihu.com/equation?tex=b" alt="数学公式">对调，还有一个方程：</p>
<img src="https://www.zhihu.com/equation?tex=x_{n%2B1}-bx_n=a^{n-1}(x_2-bx_1)_{(2)}" alt="数学公式">

<p>联立(1)(2)解得：</p>
<img src="https://www.zhihu.com/equation?tex=x_n=\frac{x_2-bx_1}{a-b}\cdot%20a^{n-1}%2B\frac{x_2-ax_1}{b-a}\cdot%20b^{n-1}" alt="数学公式">

<p>注意，这里的<img style="display:inline-block;height:35px;" src="https://www.zhihu.com/equation?tex=\frac{x_2-bx_1}{a-b}" alt="数学公式">和<img style="display:inline-block;height:35px;" src="https://www.zhihu.com/equation?tex=\frac{x_2-ax_1}{b-a}" alt="数学公式">是<strong>常数</strong>，因此，我们下次使用时不需要这么麻烦的硬解，而是根据这里推出的解的样子再次使用<strong>待定系数法</strong></p>
<p>设通项为：</p>
<img src="https://www.zhihu.com/equation?tex=x_n=\alpha\cdot%20a^{n-1}%2B\beta\cdot%20b^{n-1}" alt="数学公式">

<p>代入<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=n=1,n=2" alt="数学公式">：</p>
<img src="https://www.zhihu.com/equation?tex=%5Cleft%5C%7B+%5Cbegin%7Baligned%7D+%26x_1%3D%5Calpha%2B%5Cbeta%5C%5C+%26x_2%3D%5Calpha%5Ccdot+a%2B%5Cbeta%5Ccdot+b%5Cend%7Baligned%7D+%5Cright." alt="数学公式">

<p>解出<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=\alpha,\beta" alt="数学公式">：</p>
<img src="https://www.zhihu.com/equation?tex=%5Cleft%5C%7B+%5Cbegin%7Baligned%7D+%26%5Calpha+%3D%5Cfrac%7Bx_2-bx_1%7D%7Ba-b%7D%5C%5C+%26%5Cbeta+%3D%5Cfrac%7Bx_2-ax_1%7D%7Bb-a%7D+%5Cend%7Baligned%7D+%5Cright." alt="数学公式">

<h3 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h3><p>已知数列的前两项<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=x_1,x_2" alt="数学公式">和递推公式<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=x_{n%2B1}=px_n%2Bqx_{n-1}" alt="数学公式">，求数列<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=\{x_n\}" alt="数学公式">的通项。</p>
<ol>
<li><p>解特征方程</p>
 <img src="https://www.zhihu.com/equation?tex=x^2-px-q=0" alt="数学公式">

<p> 得出<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=a" alt="数学公式">和<img style="display:inline-block;height:25px;" src="https://www.zhihu.com/equation?tex=b" alt="数学公式"></p>
</li>
<li><p>设通项为<img style="display:inline-block;height:35px;" src="https://www.zhihu.com/equation?tex=x_n=\alpha\cdot%20a^{n-1}%2B\beta\cdot%20b^{n-1}" alt="数学公式">并代入<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=n=1,n=2" alt="数学公式">解出<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=\alpha,\beta" alt="数学公式">：</p>
<img src="https://www.zhihu.com/equation?tex=%5Cleft%5C%7B+%5Cbegin%7Baligned%7D+%26x_1%3D%5Calpha%2B%5Cbeta%5C%5C+%26x_2%3D%5Calpha%5Ccdot+a%2B%5Cbeta%5Ccdot+b%5Cend%7Baligned%7D+%5Cright." alt="数学公式">

<img src="https://www.zhihu.com/equation?tex=%5Cleft%5C%7B+%5Cbegin%7Baligned%7D+%26%5Calpha+%3D%5Cfrac%7Bx_2-bx_1%7D%7Ba-b%7D%5C%5C+%26%5Cbeta+%3D%5Cfrac%7Bx_2-ax_1%7D%7Bb-a%7D+%5Cend%7Baligned%7D+%5Cright." alt="数学公式">
</li>
<li><p>写出通项。</p>
</li>
</ol>
<h2 id="例子：斐波那契数列"><a href="#例子：斐波那契数列" class="headerlink" title="例子：斐波那契数列"></a>例子：斐波那契数列</h2><p>已知数列的前两项<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=x_1=1,x_2=1" alt="数学公式">和递推公式<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=x_{n%2B1}=x_n%2Bx_{n-1}" alt="数学公式">，求数列<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=\{x_n\}" alt="数学公式">的通项。</p>
<p>解特征方程：</p>
<img src="https://www.zhihu.com/equation?tex=r^2-r-1=0" alt="数学公式">

<img src="https://www.zhihu.com/equation?tex=r_1=\frac{1%2B\sqrt{5}}{2},r_1=\frac{1-\sqrt{5}}{2}" alt="数学公式">

<p>设通项为：</p>
<img src="https://www.zhihu.com/equation?tex=x_n=\alpha\cdot%20(\frac{1%2B\sqrt{5}}{2})^{n-1}%2B\beta\cdot%20(\frac{1%2B\sqrt{5}}{2})^{n-1}" alt="数学公式">

<p>代入<img style="display:inline-block;height:20px;" src="https://www.zhihu.com/equation?tex=x_1=1,x_2=1" alt="数学公式">：</p>
<img src="https://www.zhihu.com/equation?tex=\left\{\begin{array}{l}\alpha%2B\beta=1\\\frac{1%2B\sqrt5}{2}\cdot\alpha%2B\frac{1-\sqrt5}{2}\cdot\beta=1\end{array}\right." alt="数学公式">

<p>解得：</p>
<img src="https://www.zhihu.com/equation?tex=\left\{\begin{array}{l}\alpha=\frac{\sqrt5%2B5}{10}\\\beta=\frac{\sqrt5-5}{10}\end{array}\right." alt="数学公式">

<p>因此：</p>
<img src="https://www.zhihu.com/equation?tex=x_n=\frac{1}{\sqrt5}[(\frac{1%2B\sqrt5}{2})^2-\frac{1-\sqrt5}{2})^2]" alt="数学公式">

<p>这个公式非常神奇，虽然看起来令人头皮发麻，但算出来居然每一项都是整数！</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">from</span> math <span class="keyword">import</span> *</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">def</span> <span class="title">f</span>(<span class="params">n</span>):</span></span><br><span class="line">    <span class="keyword">return</span> (((<span class="number">1</span>+sqrt(<span class="number">5</span>))/<span class="number">2</span>)**n-((<span class="number">1</span>-sqrt(<span class="number">5</span>))/<span class="number">2</span>)**n)/sqrt(<span class="number">5</span>)</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">1</span>, <span class="number">15</span>):</span><br><span class="line">    print(f(i))</span><br></pre></td></tr></table></figure>
<img src="https://tc.skyone.host/blog/post/%E6%B1%82%E6%95%B0%E5%88%97%E9%80%9A%E9%A1%B9%E7%9A%84%E7%89%B9%E5%BE%81%E6%A0%B9%E6%B3%95/python.png" alt="python运行结果" style="zoom: 67%;" />


            <!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->
            <audio id="audio" loop="1" preload="auto" controls="controls" data-autoplay="false">
                <source type="audio/mpeg" src="">
            </audio>
            
                <ul id="audio-list" style="display:none">
                    
                        
                            <li title='0' data-url='https://tc.skyone.host/blog/music/%E6%B4%9B%E5%A4%A9%E4%BE%9D%20-%20%E5%A4%9C%E8%88%AA%E6%98%9F.flac'></li>
                        
                    
                        
                            <li title='1' data-url='https://tc.skyone.host/blog/music/%E6%B4%9B%E5%A4%A9%E4%BE%9D%20-%20%E8%8C%89%E8%8E%89%E8%8A%B1.mp3'></li>
                        
                    
                        
                            <li title='2' data-url='https://tc.skyone.host/blog/music/%E8%B5%A4%E7%BE%BD%20-%20%E4%B8%87%E5%8F%A4%E7%94%9F%E9%A6%99.flac'></li>
                        
                    
                        
                            <li title='3' data-url='https://tc.skyone.host/blog/music/%E6%B4%9B%E5%A4%A9%E4%BE%9D%20-%20%E4%B8%BA%E8%B0%81%E8%80%8C%E4%B8%BA.mp3'></li>
                        
                    
                        
                            <li title='4' data-url='https://tc.skyone.host/blog/music/%E4%B9%90%E6%AD%A3%E7%BB%AB%20-%20Faded.mp3'></li>
                        
                    
                        
                            <li title='5' data-url='https://tc.skyone.host/blog/music/bilibili2018%20-%20%E8%87%B3%E5%B0%8A%E9%A9%AC%E7%94%B2.flac'></li>
                        
                    
                </ul>
            
        </div>
        
    <div id='gitalk-container' class="comment link"
		data-enable='true'
        data-ae='true'
        data-ci='d5e197ef955b7f3268e5'
        data-cs='7d4feed7a179ad28943b0865b7970814073145ad'
        data-r='blog-gitalk'
        data-o='skyone-wzw'
        data-a='skyone-wzw'
        data-d='false'
    >查看评论</div>


    </div>
    
        <div class='side'>
			<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BA%8C%E9%98%B6%E7%BA%BF%E6%80%A7%E9%80%92%E6%8E%A8%E6%B1%82%E9%80%9A%E9%A1%B9"><span class="toc-number">1.</span> <span class="toc-text">二阶线性递推求通项</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%8E%A8%E5%AF%BC"><span class="toc-number">1.1.</span> <span class="toc-text">推导</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%80%BB%E7%BB%93"><span class="toc-number">1.2.</span> <span class="toc-text">总结</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BE%8B%E5%AD%90%EF%BC%9A%E6%96%90%E6%B3%A2%E9%82%A3%E5%A5%91%E6%95%B0%E5%88%97"><span class="toc-number">2.</span> <span class="toc-text">例子：斐波那契数列</span></a></li></ol>	
        </div>
    
</div>


    </div>
</div>
</body>

<script src="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>


<script src="//lib.baomitu.com/jquery/1.8.3/jquery.min.js"></script>
<script src="/js/plugin.js"></script>
<script src="/js/typed.js"></script>
<script src="/js/skyone.min.js"></script>


<link rel="stylesheet" href="/photoswipe/photoswipe.css">
<link rel="stylesheet" href="/photoswipe/default-skin/default-skin.css">


<script src="/photoswipe/photoswipe.min.js"></script>
<script src="/photoswipe/photoswipe-ui-default.min.js"></script>


<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>
    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">
        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>
        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">
            <div class="pswp__top-bar">
                <!--  Controls are self-explanatory. Order can be changed. -->
                <div class="pswp__counter"></div>
                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
                <button class="pswp__button pswp__button--share" title="Share"></button>
                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                      <div class="pswp__preloader__cut">
                        <div class="pswp__preloader__donut"></div>
                      </div>
                    </div>
                </div>
            </div>
            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div> 
            </div>
            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>
            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>
            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>
        </div>
    </div>
</div>




</html>
